<?php
/**
 * Created by JetBrains PhpStorm.
 * User: akrug
 * Date: 01.06.12
 * Time: 12:02
 * To change this template use File | Settings | File Templates.
 */
class Form_AbstractForm extends Zend_Form
{

    protected $_language;

    public function __construct(){

        //sets current language from Locale
        $this->_language = Zend_Registry::get('Zend_Locale')->getLanguage();

        //retrieves Translator from bootstrap
        if(!$this->hasDefaultTranslator()){
            $this->setTranslator($this->getDefaultTranslator());
        }

        foreach($this->getElements() as $e){
            $e->getDecorator('Label')->setTag('div');
            $e->getDecorator('HtmlTag')->setTag('div')->removeOption('tag');
        }
    }
}
